package cn.mw.cmdb.service;

import cn.mw.cmdb.entity.DataSourceInfo;
import cn.mw.cmdb.param.DataSourceSyncResultQueryParam;
import cn.mw.components.mongodb.entity.SearchParam;
import cn.mw.microMonitorCommon.entity.cmdb.DataSourceSyncResultVo;
import cn.mw.microMonitorCommon.entity.cmdb.TableHeaderItem;

import java.util.List;

public interface DataSourceService {

    boolean addOrUpdateDataSource(DataSourceInfo dataSourceInfo);

    boolean deleteDataSource(List<String> dataSourceIdList);

    Object getDataSourceList(SearchParam searchParam);

    List<DataSourceSyncResultVo> syncByDataSourceIds(List<String> dataSourceIds) throws Exception;

    Object getSyncResultByDataSourceId(DataSourceSyncResultQueryParam dataSourceSyncResultQueryParam) throws Exception;

    Object getSyncInstanceByTaskId(DataSourceSyncResultQueryParam dataSourceSyncResultQueryParam) throws Exception;

    List<TableHeaderItem> getDataSourceTableHeader(String datasourceId) throws Exception;
}
